package com.pearl.jacksoncore.demo.databind.dser;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.deser.BeanDeserializerModifier;
import com.fasterxml.jackson.databind.deser.DeserializerFactory;
import com.fasterxml.jackson.databind.ext.SqlBlobSerializer;
import com.fasterxml.jackson.databind.module.SimpleSerializers;
import com.fasterxml.jackson.databind.ser.DefaultSerializerProvider;
import com.fasterxml.jackson.databind.ser.SerializerFactory;

/**
 * @author TD
 * @version 1.0
 * @date 2024/4/8
 */
public class Test {

    public static void main(String[] args) throws JsonProcessingException {
        // 创建 ObjectMapper
        ObjectMapper objectMapper = new ObjectMapper();
        // 获取原有的 DeserializationContext
        DeserializationContext deserializationContext = objectMapper.getDeserializationContext();
        // 获取原有的 DeserializerFactory
        DeserializerFactory deserializerFactory = deserializationContext.getFactory();
        // 设置 BeanDeserializerModifier
        deserializerFactory.withDeserializerModifier(new BeanDeserializerModifier() {
        });
    }
}
